/**
 * Generate code from /{{projectName}}-core/src/main/java/{{packageName}}/core/{{modules}}/mapping/{{entities@MINHERIT}}InheritMapping.java.hbs
 */
package cn.ibizlab.core.authentication.mapping;

import org.mapstruct.*;
import cn.ibizlab.core.authentication.domain.AuthUser;
import cn.ibizlab.core.ad.domain.SysPerson;
import java.util.List;

/**
 * 认证用户继承映射[AuthUser]
 *
 * @author generator
 */
@Mapper(componentModel = "spring", uses = {}, nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE, nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface AuthUserInheritMapping {

    /**
     * 转换SysPerson
     * 
     * @param authUser
     * @return
     */
    @Mappings({
        @Mapping(source ="username",target = "uid"),
    })
    SysPerson toSysPerson(AuthUser authUser);

    /**
     * 转换 AuthUser
     * 
     * @param sysPerson
     * @return
     */
    @Mappings({
        @Mapping(source ="uid",target = "username"),
    })
    AuthUser toAuthUser(SysPerson sysPerson);

}